package top.chenfu.aop.compent;

import org.aopalliance.intercept.Joinpoint;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.lang.annotation.Annotation;

/**
 * @Auther chenfu
 * @2019/11/6 11:01
 * @Desc
 */
@Aspect
@Component
@Order(1)
public class AopCompent {

    /**
     * AOP1
     */
    @Before(value = "@annotation(top.chenfu.aop.anno.Demo1Aop)")
    public void before() {
        System.out.println("Demo1Aop");
    }

    /**
     * AOP2
     */
    @Before(value = "@annotation(top.chenfu.aop.anno.Demo2Aop)")
    public void Before2() {
        System.out.println("Demo2Aop");
    }

}
